package com.SpringBoot.user.mapper;

import com.SpringBoot.user.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author bxk
 * @since 2025-09-13
 */
public interface UserMapper {
    void register(User user);
    User selectByUsername(@Param("username") String username);
    User userInfo(@Param("userId") Integer userId);
    void updateUser(User user);
    User selectByUserId(@Param("userId") Integer userId);
    void updatePassword(@Param("userId") Integer userId,
                        @Param("password") String password,
                        @Param("newPassword") String newPassword);
    void updatePasswordByEmail(@Param("userId") Integer userId,
                               @Param("password") String password,
                               @Param("email") String email);

    List<User> selectAllUser(@Param("start") Integer start,
                             @Param("pageSize") Integer pageSize);

    Integer count();
}
